// niosii_system_tb.v

// Generated using ACDS version 13.0 156 at 2013.07.14.15:41:00

`timescale 1 ps / 1 ps
module niosii_system_tb (
	);

	wire         niosii_system_inst_clk_bfm_clk_clk;               // niosii_system_inst_clk_bfm:clk -> [niosii_system_inst:clk_clk, niosii_system_inst_nic_m_bfm:clk, niosii_system_inst_nic_s_bfm:clk, niosii_system_inst_niose_rst_bfm:clk, niosii_system_inst_reset_bfm:clk]
	wire         niosii_system_inst_reset_bfm_reset_reset;         // niosii_system_inst_reset_bfm:reset -> [niosii_system_inst:reset_reset_n, niosii_system_inst_nic_m_bfm:reset, niosii_system_inst_nic_s_bfm:reset]
	wire         niosii_system_inst_niose_rst_bfm_reset_reset;     // niosii_system_inst_niose_rst_bfm:reset -> niosii_system_inst:niose_rst_reset
	wire         niosii_system_inst_nic_m_waitrequest;             // niosii_system_inst:nic_m_waitrequest -> niosii_system_inst_nic_m_bfm:sig_waitrequest
	wire  [31:0] niosii_system_inst_nic_m_bfm_conduit_writedata;   // niosii_system_inst_nic_m_bfm:sig_writedata -> niosii_system_inst:nic_m_writedata
	wire  [17:0] niosii_system_inst_nic_m_bfm_conduit_address;     // niosii_system_inst_nic_m_bfm:sig_address -> niosii_system_inst:nic_m_address
	wire         niosii_system_inst_nic_m_bfm_conduit_chipselect;  // niosii_system_inst_nic_m_bfm:sig_chipselect -> niosii_system_inst:nic_m_chipselect
	wire         niosii_system_inst_nic_m_bfm_conduit_write;       // niosii_system_inst_nic_m_bfm:sig_write -> niosii_system_inst:nic_m_write
	wire         niosii_system_inst_nic_m_bfm_conduit_read;        // niosii_system_inst_nic_m_bfm:sig_read -> niosii_system_inst:nic_m_read
	wire  [31:0] niosii_system_inst_nic_m_readdata;                // niosii_system_inst:nic_m_readdata -> niosii_system_inst_nic_m_bfm:sig_readdata
	wire         niosii_system_inst_nic_s_bfm_conduit_waitrequest; // niosii_system_inst_nic_s_bfm:sig_waitrequest -> niosii_system_inst:nic_s_waitrequest
	wire  [31:0] niosii_system_inst_nic_s_writedata;               // niosii_system_inst:nic_s_writedata -> niosii_system_inst_nic_s_bfm:sig_writedata
	wire   [1:0] niosii_system_inst_nic_s_address;                 // niosii_system_inst:nic_s_address -> niosii_system_inst_nic_s_bfm:sig_address
	wire         niosii_system_inst_nic_s_chipselect;              // niosii_system_inst:nic_s_chipselect -> niosii_system_inst_nic_s_bfm:sig_chipselect
	wire         niosii_system_inst_nic_s_write;                   // niosii_system_inst:nic_s_write -> niosii_system_inst_nic_s_bfm:sig_write
	wire         niosii_system_inst_nic_s_read;                    // niosii_system_inst:nic_s_read -> niosii_system_inst_nic_s_bfm:sig_read
	wire  [31:0] niosii_system_inst_nic_s_bfm_conduit_readdata;    // niosii_system_inst_nic_s_bfm:sig_readdata -> niosii_system_inst:nic_s_readdata

	niosii_system niosii_system_inst (
		.clk_clk           (niosii_system_inst_clk_bfm_clk_clk),               //       clk.clk
		.reset_reset_n     (niosii_system_inst_reset_bfm_reset_reset),         //     reset.reset_n
		.niose_rst_reset   (niosii_system_inst_niose_rst_bfm_reset_reset),     // niose_rst.reset
		.nic_m_write       (niosii_system_inst_nic_m_bfm_conduit_write),       //     nic_m.write
		.nic_m_read        (niosii_system_inst_nic_m_bfm_conduit_read),        //          .read
		.nic_m_address     (niosii_system_inst_nic_m_bfm_conduit_address),     //          .address
		.nic_m_writedata   (niosii_system_inst_nic_m_bfm_conduit_writedata),   //          .writedata
		.nic_m_readdata    (niosii_system_inst_nic_m_readdata),                //          .readdata
		.nic_m_waitrequest (niosii_system_inst_nic_m_waitrequest),             //          .waitrequest
		.nic_m_chipselect  (niosii_system_inst_nic_m_bfm_conduit_chipselect),  //          .chipselect
		.nic_s_chipselect  (niosii_system_inst_nic_s_chipselect),              //     nic_s.chipselect
		.nic_s_write       (niosii_system_inst_nic_s_write),                   //          .write
		.nic_s_read        (niosii_system_inst_nic_s_read),                    //          .read
		.nic_s_address     (niosii_system_inst_nic_s_address),                 //          .address
		.nic_s_writedata   (niosii_system_inst_nic_s_writedata),               //          .writedata
		.nic_s_readdata    (niosii_system_inst_nic_s_bfm_conduit_readdata),    //          .readdata
		.nic_s_waitrequest (niosii_system_inst_nic_s_bfm_conduit_waitrequest)  //          .waitrequest
	);

	altera_avalon_clock_source #(
		.CLOCK_RATE (50000000),
		.CLOCK_UNIT (1)
	) niosii_system_inst_clk_bfm (
		.clk (niosii_system_inst_clk_bfm_clk_clk)  // clk.clk
	);

	altera_avalon_reset_source #(
		.ASSERT_HIGH_RESET    (0),
		.INITIAL_RESET_CYCLES (50)
	) niosii_system_inst_reset_bfm (
		.reset (niosii_system_inst_reset_bfm_reset_reset), // reset.reset_n
		.clk   (niosii_system_inst_clk_bfm_clk_clk)        //   clk.clk
	);

	altera_avalon_reset_source #(
		.ASSERT_HIGH_RESET    (1),
		.INITIAL_RESET_CYCLES (50)
	) niosii_system_inst_niose_rst_bfm (
		.reset (niosii_system_inst_niose_rst_bfm_reset_reset), // reset.reset
		.clk   (niosii_system_inst_clk_bfm_clk_clk)            //   clk.clk
	);

	altera_conduit_bfm niosii_system_inst_nic_m_bfm (
		.clk             (niosii_system_inst_clk_bfm_clk_clk),              //     clk.clk
		.reset           (~niosii_system_inst_reset_bfm_reset_reset),       //   reset.reset
		.sig_write       (niosii_system_inst_nic_m_bfm_conduit_write),      // conduit.write
		.sig_read        (niosii_system_inst_nic_m_bfm_conduit_read),       //        .read
		.sig_address     (niosii_system_inst_nic_m_bfm_conduit_address),    //        .address
		.sig_writedata   (niosii_system_inst_nic_m_bfm_conduit_writedata),  //        .writedata
		.sig_readdata    (niosii_system_inst_nic_m_readdata),               //        .readdata
		.sig_waitrequest (niosii_system_inst_nic_m_waitrequest),            //        .waitrequest
		.sig_chipselect  (niosii_system_inst_nic_m_bfm_conduit_chipselect)  //        .chipselect
	);

	altera_conduit_bfm_0002 niosii_system_inst_nic_s_bfm (
		.clk             (niosii_system_inst_clk_bfm_clk_clk),               //     clk.clk
		.reset           (~niosii_system_inst_reset_bfm_reset_reset),        //   reset.reset
		.sig_chipselect  (niosii_system_inst_nic_s_chipselect),              // conduit.chipselect
		.sig_write       (niosii_system_inst_nic_s_write),                   //        .write
		.sig_read        (niosii_system_inst_nic_s_read),                    //        .read
		.sig_address     (niosii_system_inst_nic_s_address),                 //        .address
		.sig_writedata   (niosii_system_inst_nic_s_writedata),               //        .writedata
		.sig_readdata    (niosii_system_inst_nic_s_bfm_conduit_readdata),    //        .readdata
		.sig_waitrequest (niosii_system_inst_nic_s_bfm_conduit_waitrequest)  //        .waitrequest
	);

endmodule
